﻿
using System.Data;
using MySql.Data.MySqlClient;


namespace WebApp.Services
{
    public class DapperService : IDataBaseService
    {
        private readonly DbConnectionConfigurationServicecs _dbConfig;
        public DapperService(DbConnectionConfigurationServicecs dbConfig)
        {
            _dbConfig = dbConfig;
        }

        public MySqlConnection GetConnection()
        {
            // var conn = new MySqlConnection(DbContextBase.GetConnectStr("XiaoWei"));
            var conn = new MySqlConnection(_dbConfig.DbConnection.MySql);
            conn.Open();
            return conn;

        }

      

    }
}
